package com.superarai.portal.enums;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

import org.seasar.framework.log.Logger;

public enum Config {
	;
	
	Logger logger = Logger.getLogger(Config.class); 
	static ResourceBundle resourceBundle = ResourceBundle.getBundle("config");
	
	/** */
	public enum Page {
		/** ログインページ */
		LOGIN("path.login"),
		
		/** ユーザ登録ページ */
		SIGNUP("path.signup")
		;
		String urlKey;
		
		Page(String urlKey) {
			if(urlKey == null)
				throw new NullPointerException("urlKeyは必須です。");
			this.urlKey = urlKey;
		}
		
		public String getURL() {
			try {
				return resourceBundle.getString(this.urlKey);
			} catch (MissingResourceException e) {
				return "";
			}
		}
	}
}
